package o;

import android.content.Context;
import android.text.format.DateUtils;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import java.util.Calendar;
import java.util.Formatter;
import java.util.LinkedHashMap;
import java.util.Locale;
import o.ewm.n;

public class eed {
    public static String ˋ(String str, String str2) {
        Appendable stringBuilder = new StringBuilder();
        if (dof.ˋ(str) || dof.ˋ(str2)) {
            return stringBuilder.toString();
        }
        return new Formatter(stringBuilder, Locale.getDefault()).format("%s%.2f", new Object[]{str, Float.valueOf(str2)}).toString();
    }

    public static void ˊ(String str, String str2, int i, int i2) {
        LinkedHashMap linkedHashMap = new LinkedHashMap(4);
        linkedHashMap.put("product_id", str);
        linkedHashMap.put("package_name", str2);
        linkedHashMap.put(HiAnalyticsConstant.BI_KEY_RESUST, String.valueOf(i));
        linkedHashMap.put("service_type", String.valueOf(i2));
        dgh.ˋ(ContentManager.getInstant().getContext().getString(n.ˉॱ), linkedHashMap);
    }

    public static int ˋ(Context context) {
        int i = context.getResources().getConfiguration().screenWidthDp;
        if (i <= 600) {
            return 1;
        }
        if (i <= 840) {
            return 2;
        }
        return 3;
    }

    public static String ˋ(Context context, long j, long j2) {
        int i = 1;
        if (j <= 0) {
            return null;
        }
        Calendar instance = Calendar.getInstance();
        instance.setTimeInMillis(j);
        Calendar instance2 = Calendar.getInstance();
        instance2.setTimeInMillis(j2);
        if (instance.get(1) != instance2.get(1)) {
            i = 0;
        }
        if (i != 0) {
            i = 131089;
        } else {
            i = 131093;
        }
        return DateUtils.formatDateTime(context, j, i);
    }
}
